﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="SubjectInfo.aspx.cs" Inherits="ExamAnalysis.Manage.SubjectInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
 <style type="text/css">
        .x-grid-cell-fullName .x-grid-cell-inner {
            font-family : tahoma, verdana;
            display     : block;
            font-weight : normal;
            font-style  : normal;
            color       : #385F95;
            white-space : normal;
        }
        
        .x-grid-rowbody div {
            margin : 2px 5px 20px 5px !important;
            width  : 99%;
            color  : Gray;
        }
        
        .x-grid-row-expanded td.x-grid-cell{
            border-bottom-width:0px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:LinqDataSource ID="SchoolInfoLinqDataSource" runat="server" 
        ContextTypeName="ExamAnalysis.Model.ExamAnalysisDataContext" EntityTypeName="" 
        TableName="SchoolInfo">
    </asp:LinqDataSource>
    <ext:GridPanel 
            runat="server" 
            ID="SubjectInfoGridPanel" 
            Height="420" 
            Width="600"
            Title="科目信息" 
            Frame="true">
            <Store>
                <ext:Store ID="Store2" runat="server" >
                    <Model>
                        <ext:Model ID="Model1" runat="server" Name="SubjectInfo" IDProperty="SubjectID">
                            <Fields>
                                <ext:ModelField Name="SubjectID" />
                                <ext:ModelField Name="SubjectCode" />
                                <ext:ModelField Name="SubjectName" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
            </Store>
            <ColumnModel ID="ColumnModel2" runat="server" >
			    <Columns>                
                    <ext:Column ID="Column1" runat="server" DataIndex="SubjectCode" Text="科目编号"  Width="150">
                    <Editor>
                         <ext:TextField ID="TextField1" runat="server" />
                    </Editor>
                    </ext:Column>
                    <ext:Column ID="Column2" runat="server" DataIndex="SubjectName" Text="科目名称"  Width="150" >
                    <Editor>
                         <ext:TextField ID="TextField2" runat="server" />
                    </Editor>
                    </ext:Column>
			    </Columns>
            </ColumnModel>    
            <SelectionModel>
              <ext:RowSelectionModel ID="RowSelectionMode2" runat="server" Mode="Single" />
             </SelectionModel>     
             <TopBar>
            <ext:Toolbar ID="Toolbar1" runat="server">
                    <Items>
                    
                </Items>
                </ext:Toolbar>
            </TopBar>
            <BottomBar>
                <ext:Toolbar ID="Toolbar6" runat="server">
                <Items>
                 <ext:Button ID="Button2" Text="添加科目" runat="server" OnDirectClick="Button2_Click" />
                 <ext:Button ID="Button3" Text="更改选中科目" runat="server" OnDirectClick="Button3_Click" />
                 <ext:Button ID="Button4" Text="删除选中科目" runat="server" OnDirectClick="Button4_Click" />
                 </Items>
                </ext:Toolbar>
                </BottomBar>
        </ext:GridPanel>
        <ext:Window 
            ID="FormWindow" 
            runat="server" 
            Title="科目信息编辑" 
            Width="420" 
            Height="220"           
            BodyPadding="10" 
            Resizable="false" 
            Closable="True"
            Layout="Fit" AutoShow="False" HideCollapseTool="False" Hidden="True" HideMode="Visibility">
            <Items>
                <ext:FormPanel 
                    ID="FormPanel1" 
                    runat="server" 
                    Border="false" 
                    BodyStyle="background-color:transparent;"
                    DefaultAnchor="-10"
                    Layout="Form">
                    <Items>
                        <ext:TextField 
                            ID="SubjectCode"
                            runat="server" 
                            Name="SubjectCode" 
                            MsgTarget="Side" 
                            AllowBlank="false"
                            FieldLabel="科目编号" 
                            />
                        <ext:TextField 
                            ID="SubjectName" 
                            runat="server" 
                            Name="SubjectName" 
                            MsgTarget="Side" 
                            AllowBlank="false"
                            FieldLabel="科目名称" 
                            />                                 
                            
                    </Items>
                </ext:FormPanel>
            </Items>
            <BottomBar>
        <ext:Toolbar ID="Toolbar3" runat="server">
                    <Items>
                        <ext:Button ID="Button6" runat="server" Icon="Add" Text="Add" Visible="true">
                          <DirectEvents>
                                <Click OnEvent="Add_Click" />
                           </DirectEvents>
                        </ext:Button>      
                         <ext:Button ID="Button7" runat="server" Icon="Accept" Text="Update" Visible="true">
                          <DirectEvents>
                                <Click OnEvent="Change_Click" />
                           </DirectEvents>
                        </ext:Button>              
                        <ext:ToolbarFill ID="ToolbarFill1" runat="server" /> 
                    </Items>
                </ext:Toolbar>
            </BottomBar>
        </ext:Window>
</asp:Content>
